Skip to main content
This forum is closed to new posts and responses. The content has been migrated to the Digital Solutions Community. Please join us there for new content as well as this content. For customer support, please visit the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

Previous Next

code to try convert the mime to rich text

This code works perfectly in a Notes 6.5 client. It does a conversion on the mime and makes it a true Notes rich text field. The formatting changes a bit due to the conversion but it is still better than plain text with no formatting.

The same bit of code when run on a Notes 8.5 client results in an empty Body field.

Sub Initialize
Dim session As NotesSession
Dim db As NotesDatabase
Dim dc As NotesDocumentCollection
Dim doc As NotesDocument
Dim body As NotesRichTextItem
Dim item As NotesItem

Set session = New NotesSession
Set db = session.CurrentDatabase
Set dc = db.UnprocessedDocuments
Set doc = dc.GetFirstDocument

While Not doc Is Nothing
Call doc.Computewithform(False, False)
Call doc.Save(True, False)

Set item = doc.Getfirstitem("$NoteHasNativeMime")
If Not item Is Nothing Then
Call item.Remove()
End If
Set item = doc.Getfirstitem("$MIMETrack")
If Not item Is Nothing Then
Call item.Remove()
End If
Set item = doc.Getfirstitem("MIME_Version")
If Not item Is Nothing Then
Call item.Remove()
End If
Call doc.Save(True, False)

doc.Title = "Convert Mime agent B (Notes version " + session.Notesversion + ")"

Set body = doc.Getfirstitem("Body")
Call body.Appendtext(" ")
Call doc.Save(True, False)

Set doc = dc.GetNextDocument(doc)
Wend
End Sub


Feedback response number WEBB8UM28F created by ~Tony Minvelutexoni on 05/25/2012

MIME field contents removed when co... (~Tony Minvelute... 21.May.12)
. . code to try convert the mime to ric... (~Tony Minvelute... 25.May.12)
. . resolved (~Tony Minvelute... 30.May.12)




Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS